/*
 * 频道
 */
class Channel{
  final int id;
  final String name;
  final String icon;
  final String route;

  Channel(this.id, this.name, this.icon, this.route);

  Channel.fromJson(Map<String, dynamic> json)
  : id = json['id'],
        name = json['name'],
        icon = json['icon'],
        route = json['route'];

  Map<String, dynamic> toJson() =>
      <String, dynamic>{
        'id': id,
        'name': name,
        'icon': icon,
        'route': route,
      };

  @override
  String toString() {
    return 'Channel{id: $id, name: $name, icon: $icon, route: $route}';
  }
}